import { NgModule } from '@angular/core'
import { Routes, RouterModule } from '@angular/router'
import { MenuListComponent } from './list/list.component'
import { MenuNewComponent } from './new/new.component'
import { NewRouterGuardClass } from '@shared/classes/NewRouterGuardClass'

const routes: Routes = [
  {
    path: '',
    component: MenuListComponent,
    data: {
      titleI18n: 'MENU.MENUS',
    },
  },
  {
    path: 'new',
    component: MenuNewComponent,
    canDeactivate: [NewRouterGuardClass],
    data: {
      breadcrumb: 'GENERAL.INFO.BREADCRUMB.CREATE',
      titleI18n: 'GENERAL.INFO.BREADCRUMB.CREATE',
    },
  },
]

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
})
export class MenuRoutingModule {}
